package ltd.cheers.mall.dao;

import ltd.cheers.mall.entity.CheersMallGoods;
import ltd.cheers.mall.entity.StockNumDTO;
import ltd.cheers.mall.util.PageQueryUtil;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CheersMallGoodsMapper {
    int deleteByPrimaryKey(Long goodsId);

    int insert(CheersMallGoods record);

    int insertSelective(CheersMallGoods record);

    CheersMallGoods selectByPrimaryKey(Long goodsId);

    int updateByPrimaryKeySelective(CheersMallGoods record);

    int updateByPrimaryKeyWithBLOBs(CheersMallGoods record);

    int updateByPrimaryKey(CheersMallGoods record);

    List<CheersMallGoods> findCheersMallGoodsList(PageQueryUtil pageUtil);

    int getTotalCheersMallGoods(PageQueryUtil pageUtil);

    List<CheersMallGoods> selectByPrimaryKeys(List<Long> goodsIds);

    List<CheersMallGoods> findCheersMallGoodsListBySearch(PageQueryUtil pageUtil);

    int getTotalCheersMallGoodsBySearch(PageQueryUtil pageUtil);

    int batchInsert(@Param("cheersMallGoodsList") List<CheersMallGoods> cheersMallGoodsList);

    int updateStockNum(@Param("stockNumDTOS") List<StockNumDTO> stockNumDTOS);

    int batchUpdateSellStatus(@Param("orderIds")Long[] orderIds,@Param("sellStatus") int sellStatus);




}